USE [LAFDC]
GO
/****** Object:  StoredProcedure [dbo].[spGetFAMILLE_byPrevID]    Script Date: 11/23/2009 23:01:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		Ludovic FERRE
-- Create date: 2007-09-05
-- Description:	Return familly details by prev_id
-- =============================================
CREATE PROCEDURE [dbo].[spGetFAMILLE_byPrevID]
	@PREV_ID as nvarchar(255)
AS
BEGIN
	SET NOCOUNT ON;

	select id, sfam as 'Position', nom, prenom, [civ-sexe] as 'Sexe', anniv
	  from personne
	 where PREV_ID = @PREV_ID and (sfam ='Enfant' or sfam='conjoint(e)')
	 order by sfam, id

END
